<%--
    增加/修改查询
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="j" uri="j/tags" %>
<%@ taglib prefix="st" tagdir="/WEB-INF/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<st:form formId="frmQuery" action="?act=save">

    <input type="hidden" name="queryId" value="${d.queryId}"/>
    <table class="layout">
        <colgroup>
            <col style="width:130px"/>
            <col/>
        </colgroup>
        <tr>
            <th><span class="required">*</span>查询名称:</th>
            <td>
                <input type="text" required name="name" value="${d.name}" style="width:200px;"/>
            </td>
        </tr>
        <tr>
            <th><span>*</span>所属模块：</th>
            <td>
                <select id="functionId" name="functionId" class="easyui-combotree" style="width:200px;"
                        data-options="url:'/user/center?act=menu',value:'<j:des data="${d.functionId}"/>'"></select>
            </td>
        </tr>
        <tr>
            <th><span>*</span>查询key:</th>
            <td>
                <input type="text" required name="queryKey" value="${d.queryKey}" style="width:200px;"/>
            </td>
        </tr>
        <tr>
            <th>查询语句(SQL):</th>
            <td>
                <textarea name="querySql"  rows="2" cols="30" required placeholder="若使用了子查询，请在最外级的from处增加@@（双@）符号，否则分页查询时出错。">${d.querySql}</textarea>
            </td>
        </tr>
        <tr>
            <th>是否存储过程:</th>
            <td>
                <input type="checkbox" name="storeProcedure" <c:if test="${d.storeProcedure}">checked</c:if> />
            </td>
        </tr>
        <tr>
            <th>是否NamedSQL:</th>
            <td>
                <input type="checkbox" name="namedSql" <c:if test="${d.namedSql}">checked</c:if> />
            </td>
        </tr>
        <tr>
            <th>是否TreeGrid:</th>
            <td>
                <input type="checkbox" name="showByTree" <c:if test="${d.showByTree}">checked</c:if> />
            </td>
        </tr>
        <tr>
            <th>是否显示操作:</th>
            <td>
                <input type="checkbox" name="operatorSupported" <c:if test="${d.operatorSupported}">checked</c:if> />
            </td>
        </tr>
        <tr>
            <th>是否支持分页:</th>
            <td>
                <input type="checkbox" name="pagingSupported" <c:if test="${d.pagingSupported}">checked</c:if> />
            </td>
        </tr>
        <tr>
            <th>默认页大小:</th>
            <td>
                <input type="number" name="defaultPageSize" value="${d.defaultPageSize}" />
            </td>
        </tr>
        <tr>
            <th>默认分页列表:</th>
            <td>
                <input type="text" name="defaultPageList" value="${d.defaultPageList}" placeholder="以逗号隔开数字列表，如：20,30,50"/>
            </td>
        </tr>
        <tr>
            <th>是否支持多选:</th>
            <td>
                <input type="checkbox" name="multiSelectSupported" <c:if test="${d.multiSelectSupported}">checked</c:if> />
            </td>
        </tr>
        <tr>
            <th>是否显示Footer:</th>
            <td>
                <input type="checkbox" name="footerSupported" <c:if test="${d.footerSupported}">checked</c:if> />
            </td>
        </tr>
        <tr>
            <th>冻结设置</th>
            <td>
                <ol>
                    <li>冻结左<input type="number" name="frozenLeftColumns" value="${d.frozenLeftColumns}" style="width:30px;" />列</li>
                    <li>冻结右<input type="number" name="frozenRightColumns" value="${d.frozenRightColumns}" style="width:30px;" />列</li>
                    <li>冻结上<input type="number" name="frozenTopRows" value="${d.frozenTopRows}" style="width:30px;" />行</li>
                </ol>
            </td>
        </tr>
        <tr>
            <th>Footer选项:</th>
            <td>
                <input type="text" name="footerOptions" value="${d.footerOptions}" style="width:200px;"/>
            </td>
        </tr>
        <tr>
            <th>实现类:</th>
            <td>
                <input type="text" name="dataHandlerClassName" value="${d.dataHandlerClassName}" style="width:200px;"/>
            </td>
        </tr>
        <tr>
            <th>查询条件构造方法名:</th>
            <td>
                <input type="text" name="buildWhereMethodName" value="${d.buildWhereMethodName}" style="width:200px;"/>
            </td>
        </tr>
        <tr>
            <th>是否支持列拖拽:</th>
            <td>
                <input type="checkbox" name="columnMovingSupported" <c:if test="${d.columnMovingSupported}">checked</c:if> />
            </td>
        </tr>
        <tr>
            <th>是否支持多列排序:</th>
            <td>
                <input type="checkbox" name="multiColumnSortedSupported" <c:if test="${d.multiColumnSortedSupported}">checked</c:if> />
            </td>
        </tr>
        <tr>
            <th>行点击事件:</th>
            <td>
                <input type="text" name="rowClick" value="${d.rowClick}" style="width:200px;"/>
            </td>
        </tr>
        <tr>
            <th>行格式化事件:</th>
            <td>
                <input type="text" name="rowStyler" value="${d.rowStyler}" style="width:200px;"/>
            </td>
        </tr>
    </table>
</st:form>
